package com.hen.web.henweb.service;

import com.hen.web.henweb.common.Pageable;
import com.hen.web.henweb.model.po.Article;
import com.hen.web.henweb.model.vo.ArticleVO;

import java.util.List;

/**
 * @author 狠穿
 * @version 1.0.0
 * @date 2023/4/30
 * @function 文章业务层接口
 */
public interface ArticleService {
    //发布文章
    int publishArticle(String title,String authorId,String content);
    //删除文章
    int deleteArticle(String id);
    //修改文章
    int updateArticle(String id,String title,String content);
    //查询文章
    List<ArticleVO> listArticles(Pageable pageable);
    //根据ID获取文章
    Article getArticleById(String articleId);
    //判断文章是否存在
    Boolean existArticle(String articleId);
    //阅读文章
    int readArticle(String articleId,String userId);
    //点赞文章
    int praiseArticle(String articleId,String userId);
    //收藏文章
    int collectArticle(String articleId,String userId);
}
